SUBROUTINE SETPARAM
     * Demonstrate the RW_SET_PARAM subroutine.

     * Include the RealWeb definitions.
     INCLUDE #RW.INCLUDE.DEFS FROM /SYSFILES/REALWEB,BP

     * A RealWeb enabled subroutine cannot have any arguments, so
     * though I can call it from another routine, I can't pass it
     * any parameters. However, if I know it uses RW_GET_PARAM
     * to retrieve parameters passed by the browser, I can set
     * those parameters using RW_SET_PARAM before calling it. In
     * this simple example, the DISPLAYPARAMS subroutine displays
     * all the parameters passed to it.

     * Set some parameters.
     CALL RW_SET_PARAM("FIRSTNAME", "Esmerelda")
     CALL RW_SET_PARAM("KNOWNAS", "Granny")
     CALL RW_SET_PARAM("SURNAME", "Weatherwax")
     CALL RW_SET_PARAM("JOB", "Witch")

     * Now display them.
     CALL DISPLAYPARAMS
RETURN

Go to top button